package com.example.shixunandjavagotoyangchen.Eternity.QidongActivity;

import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;

import com.alibaba.android.arouter.launcher.ARouter;
import com.bumptech.glide.Glide;
import com.example.shixunandjavagotoyangchen.R;

public class QidongActivity extends AppCompatActivity {

    Handler handler = new Handler() {
        @Override
        public void dispatchMessage(@NonNull Message msg) {
            super.dispatchMessage(msg);
            if (msg.what == 555) {
                ARouter.getInstance()
                        .build("/qidong/start")
                        .withString("qidong","启动")
                        .navigation();
                finish();
            }
        }
    };
    private ImageView jiazai;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_qidong);
        initView();
        onWindowFocusChanged(true);

        Glide.with(this)
                .load("https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fzkres1.myzaker.com%2F201812%2F5c24ad92622768c92a019043_raw.gif&refer=http%3A%2F%2Fzkres1.myzaker.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1637483483&t=795074bf7d53bde424f1c3787b3bb48e").into(jiazai);
        handler.sendEmptyMessageDelayed(555, 5000);


    }



    private void initView() {
        jiazai = (ImageView) findViewById(R.id.jiazai);
    }
}
